import axios from './axios'
import { apiUrl } from '../config/config'
var url = apiUrl + '/student-daily-report'
// 教师端—根据不同的排行条件获取列表 /student-daily-report/dailyActivity/listActivityByTeacherCondition
export const getTeacherList = (params) => {
	// console.log(params)
    return new Promise((resolve,reject) => {
        axios({
            url: url + '/dailyActivity/listActivityByTeacherCondition',
            method: 'post',
            params
        }).then(res => {
            resolve(res.data)
        })
    })
}
// 家长端—根据不同的排行条件获取列表 /student-daily-report/dailyActivity/listActivityByCondition
export const getParentList = (params) => {
	// console.log(params)
    return new Promise((resolve,reject) => {
        axios({
            url: url + '/dailyActivity/listActivityByCondition',
            method: 'post',
            params
        }).then(res => {
            resolve(res.data)
        })
    })
}
//  根据条件获取当日学生活跃度详情 /student-daily-report/dailyActivity/getDailyActivityByCondition
export const getStudentDetail = (params) => {
	// console.log(params)
    return new Promise((resolve,reject) => {
        axios({
            url: url + '/dailyActivity/getDailyActivityByCondition',
            method: 'post',
            params
        }).then(res => {
            resolve(res.data)
        })
    })
}
// 根据条件报获取7天柱状图数据 /student-daily-report/dailyActivity/listHistogramData
export const getEchartsData = (params) => {
	// console.log(params)
    return new Promise((resolve,reject) => {
        axios({
            url: url + '/dailyActivity/listHistogramData',
            method: 'post',
            params
        }).then(res => {
            resolve(res.data)
        })
    })
}
// 点赞  /student-daily-report/givePraise/updatePraiseByStatus
export const likeGo = (params) => {
	// console.log(params)
    return new Promise((resolve,reject) => {
        axios({
            url: url + '/givePraise/updatePraiseByStatus',
            method: 'post',
            params
        }).then(res => {
            resolve(res.data)
        })
    })
}